using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Planisoft.Entities;

namespace Planisoft.DAO.Mapping
{
    public class VinculoFaminiliarMap : EntityTypeConfiguration<VinculoFamiliar>
    {
        public VinculoFaminiliarMap()
        {
            // Primary Key
            this.HasKey(t => t.IdVinculoFam);

            // Properties
            this.Property(t => t.CodPdtVincFami)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.DescVincFam)
                .HasMaxLength(250);

            // Table & Column Mappings
            this.ToTable("VinculoFaminiliar");
            this.Property(t => t.IdVinculoFam).HasColumnName("IdVinculoFam");
            this.Property(t => t.CodPdtVincFami).HasColumnName("CodPdtVincFami");
            this.Property(t => t.DescVincFam).HasColumnName("DescVincFam");
        }
    }
}
